{extends file="include/base_with_menu.tpl"}

{block name="content"}
<div class="layout">
    <a href="/perm/user/user/add/page">添加帐号</a>&nbsp;&nbsp;
</div>
    {foreach $department_info as $info}
        {if in_array($info.id, $preset_department)}{continue}{/if}
<h3 class="blockTitle">{$info.name|escape}<span class="tip">(共{$user_info[$info.id]|count}人)</span></h3>
    <div class="layout">
        <table class="tbLayout01" width="80%" cellspacing="0" cellpadding="0">
            <tr>
                <td width="50" class="textRight">&nbsp;</td>
                <td class="textLeft">
        {foreach $user_info[$info.id] as $user}
                    {if $SESSION->is_master() || ! in_array($user.id, $perm_user_list)}
                    <a href="/perm/user/user/detail?u_id={$user.id}">{$user.name}</a>&nbsp;&nbsp;
                    {/if}
        {/foreach}
                </td>
            </tr>
        </table>
    </div>
    {/foreach}
    {foreach $department_info as $info}
        {if in_array($info.id, $preset_department)}
<h3 class="blockTitle">{$info.name|escape}<span class="tip">(共{$user_info[$info.id]|count}人)</span></h3>
    <div class="layout">
        <table class="tbLayout01" width="80%" cellspacing="0" cellpadding="0">
            <tr>
                <td width="50" class="textRight">&nbsp;</td>
                <td class="textLeft">
        {foreach $user_info[$info.id] as $user}
                    {if $SESSION->is_master() || ! in_array($user.id, $perm_user_list)}
                    <a href="/perm/user/user/detail?u_id={$user.id}">{$user.name}</a>&nbsp;&nbsp;
                    {/if}
        {/foreach}
                </td>
            </tr>
        </table>
    </div>
        {/if}
    {/foreach}
{/block}
